home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / RCS / bigcmdtop.mk,v < prev    next >
Encoding:
Text File  |  1992-05-18  |  22.7 KB  |  1,249 lines

  1. head     1.38;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    mottsmth:1.38; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.38
  10. date     91.11.06.18.34.52;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.37;
  13.  
  14. 1.37
  15. date     90.04.15.11.52.57;  author mendel;  state Exp;
  16. branches ;
  17. next     1.36;
  18.  
  19. 1.36
  20. date     90.03.07.15.00.57;  author douglis;  state Exp;
  21. branches ;
  22. next     1.35;
  23.  
  24. 1.35
  25. date     90.02.27.17.43.05;  author douglis;  state Exp;
  26. branches ;
  27. next     1.34;
  28.  
  29. 1.34
  30. date     90.02.20.11.50.16;  author douglis;  state Exp;
  31. branches ;
  32. next     1.33;
  33.  
  34. 1.33
  35. date     90.01.30.19.43.04;  author tve;  state Exp;
  36. branches ;
  37. next     1.32;
  38.  
  39. 1.32
  40. date     90.01.30.19.40.27;  author tve;  state Exp;
  41. branches ;
  42. next     1.31;
  43.  
  44. 1.31
  45. date     89.12.13.21.30.39;  author tve;  state Exp;
  46. branches ;
  47. next     1.30;
  48.  
  49. 1.30
  50. date     89.11.30.13.56.44;  author rab;  state Exp;
  51. branches ;
  52. next     1.29;
  53.  
  54. 1.29
  55. date     89.11.30.11.11.12;  author douglis;  state Exp;
  56. branches ;
  57. next     1.28;
  58.  
  59. 1.28
  60. date     89.10.09.16.59.21;  author tve;  state Exp;
  61. branches ;
  62. next     1.27;
  63.  
  64. 1.27
  65. date     89.10.09.06.55.55;  author rab;  state Exp;
  66. branches ;
  67. next     1.26;
  68.  
  69. 1.26
  70. date     89.10.02.10.05.56;  author rab;  state Exp;
  71. branches ;
  72. next     1.25;
  73.  
  74. 1.25
  75. date     89.07.21.18.29.53;  author douglis;  state Exp;
  76. branches ;
  77. next     1.24;
  78.  
  79. 1.24
  80. date     89.07.20.17.36.25;  author mgbaker;  state Exp;
  81. branches ;
  82. next     1.23;
  83.  
  84. 1.23
  85. date     89.07.02.23.31.02;  author rab;  state Exp;
  86. branches ;
  87. next     1.22;
  88.  
  89. 1.22
  90. date     89.07.02.23.06.19;  author douglis;  state Exp;
  91. branches ;
  92. next     1.21;
  93.  
  94. 1.21
  95. date     89.06.29.17.30.11;  author douglis;  state Exp;
  96. branches ;
  97. next     1.20;
  98.  
  99. 1.20
  100. date     89.04.23.23.20.20;  author jhh;  state Exp;
  101. branches ;
  102. next     1.19;
  103.  
  104. 1.19
  105. date     89.04.03.22.23.41;  author douglis;  state Exp;
  106. branches ;
  107. next     1.18;
  108.  
  109. 1.18
  110. date     89.03.15.22.25.09;  author douglis;  state Exp;
  111. branches ;
  112. next     1.17;
  113.  
  114. 1.17
  115. date     89.03.15.22.14.13;  author jhh;  state Exp;
  116. branches ;
  117. next     1.16;
  118.  
  119. 1.16
  120. date     88.12.31.11.11.58;  author ouster;  state Exp;
  121. branches ;
  122. next     1.15;
  123.  
  124. 1.15
  125. date     88.12.29.08.37.54;  author ouster;  state Exp;
  126. branches ;
  127. next     1.14;
  128.  
  129. 1.14
  130. date     88.12.28.17.06.25;  author ouster;  state Exp;
  131. branches ;
  132. next     1.13;
  133.  
  134. 1.13
  135. date     88.11.23.17.28.22;  author ouster;  state Exp;
  136. branches ;
  137. next     1.12;
  138.  
  139. 1.12
  140. date     88.11.23.09.52.14;  author ouster;  state Exp;
  141. branches ;
  142. next     1.11;
  143.  
  144. 1.11
  145. date     88.11.10.17.52.58;  author douglis;  state Exp;
  146. branches ;
  147. next     1.10;
  148.  
  149. 1.10
  150. date     88.11.08.11.17.49;  author douglis;  state Exp;
  151. branches ;
  152. next     1.9;
  153.  
  154. 1.9
  155. date     88.10.19.16.48.30;  author ouster;  state Exp;
  156. branches ;
  157. next     1.8;
  158.  
  159. 1.8
  160. date     88.10.19.09.40.12;  author ouster;  state Exp;
  161. branches ;
  162. next     1.7;
  163.  
  164. 1.7
  165. date     88.10.14.16.54.31;  author ouster;  state Exp;
  166. branches ;
  167. next     1.6;
  168.  
  169. 1.6
  170. date     88.10.03.09.51.58;  author ouster;  state Exp;
  171. branches ;
  172. next     1.5;
  173.  
  174. 1.5
  175. date     88.10.02.17.14.55;  author ouster;  state Exp;
  176. branches ;
  177. next     1.4;
  178.  
  179. 1.4
  180. date     88.10.02.11.30.33;  author ouster;  state Exp;
  181. branches ;
  182. next     1.3;
  183.  
  184. 1.3
  185. date     88.09.19.09.02.38;  author ouster;  state Exp;
  186. branches ;
  187. next     1.2;
  188.  
  189. 1.2
  190. date     88.09.11.17.02.28;  author ouster;  state Exp;
  191. branches ;
  192. next     1.1;
  193.  
  194. 1.1
  195. date     88.09.09.17.44.19;  author ouster;  state Exp;
  196. branches ;
  197. next     ;
  198.  
  199.  
  200. desc
  201. @@
  202.  
  203.  
  204. 1.38
  205. log
  206. @Generate the lint library correctly, and name it so that it can be
  207. used to lint individual modules.
  208. @
  209. text
  210. @#
  211. # This is a library Makefile that is included by the Makefiles for
  212. # the top-level directories of multi-directory libraries ("biglib"s).
  213. # For most targets, this file just passes the targets on to each of
  214. # the subdirectories.  The file that includes this one should already
  215. # have defined the following variables:
  216. #    LIBRARY        base name of library (e.g. tcl, sx, c, etc.)
  217. #    LINTDIR        place to install lint library (we'll add a .mach
  218. #            extension here)
  219. #    SUBDIRS        subdirectories that contain "interesting" things
  220. #            (e.g., individual commands, modules of the kernel,
  221. #            of sub-portions of a large library).
  222. #    TM        target machine type for object files etc.
  223. #    TYPE        a keyword identifying which sort of command this
  224. #            is;  used to determine where to install, etc.
  225. #
  226. # A bunch of variables are passed on to lower-level makes, if they are
  227. # defined;  see the definitions immediately below for a complete list.
  228. #    
  229. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.37 90/04/15 11:52:57 mendel Exp Locker: kupfer $
  230. #
  231.  
  232. OBJS        = $(SUBDIRS:S|$|/$(TM).md/linked.o|g)
  233. POBJS        = $(SUBDIRS:S|$|/$(TM).md/linked.po|g)
  234.  
  235. #
  236. # Suffix for profiled targets.
  237. #
  238. PROFSUFFIX    ?= .pg
  239.  
  240. #
  241. # System programs -- assign conditionally so they may be redefined in
  242. # including makefile
  243. #
  244. BINDIR        ?= /sprite/cmds.$(MACHINE)
  245.  
  246. CAT        ?= $(BINDIR)/cat
  247. CP        ?= $(BINDIR)/cp
  248. MV        ?= $(BINDIR)/mv
  249. RM        ?= $(BINDIR)/rm
  250. TEST            ?= $(BINDIR)/test
  251. UPDATE        ?= $(BINDIR)/update
  252.  
  253. #
  254. # Several variables (such as where to install) are set based on the
  255. # TYPE variable.  Of course, any of these variables can be overridden
  256. # by explicit assignments.
  257. #
  258. TYPE        ?= unknown
  259. #if !empty(TYPE:Msprite)
  260. INSTALLDIR    ?= /sprite/cmds
  261. INSTALLMAN    ?= /sprite/man/cmds
  262. #elif !empty(TYPE:Mx)
  263. INSTALLDIR    ?= /X/cmds
  264. INSTALLMAN    ?= /X/man/cmds
  265. #elif !empty(TYPE:MX11R3)
  266. INSTALLDIR    ?= /mic/X11R3/cmds
  267. INSTALLMAN    ?= /mic/X11R3/man/cmds
  268. #elif !empty(TYPE:MX11R4)
  269. INSTALLDIR    ?= /X11/R4/cmds
  270. INSTALLMAN    ?= /X11/R4/man/cmds
  271. #elif !empty(TYPE:Mdaemon)
  272. INSTALLDIR    ?= /sprite/daemons
  273. INSTALLMAN    ?= /sprite/man/daemons
  274. #elif !empty(TYPE:Madmin)
  275. INSTALLDIR    ?= /sprite/admin
  276. INSTALLMAN    ?= /sprite/man/admin
  277. #elif !empty(TYPE:Mpersonal)
  278. INSTALLDIR    ?= $(HOME)/cmds
  279. INSTALLMAN    ?= $(HOME)/man/cmds
  280. LOADFLAGS    += -L$(HOME)/lib/$(TM).md
  281. XCFLAGS        += -I$(HOME)/lib/include
  282. .PATH.h        : $(HOME)/lib/include
  283. #ifndef        USERBACKUP
  284. NOBACKUP    =
  285. #endif
  286. #endif
  287. #ifdef INSTALLDIR
  288. TMINSTALLDIR    ?= $(INSTALLDIR).$(TM)
  289. #endif
  290.  
  291. #
  292. # Figure out what stuff we'll pass to sub-makes.
  293. #
  294. PASSVARS    =
  295. #ifdef        CC
  296. PASSVARS    += 'CC=$(CC)'
  297. #endif
  298. #ifdef        XCFLAGS
  299. PASSVARS    += 'XCFLAGS=$(XCFLAGS)'
  300. #endif
  301. #ifdef        XAFLAGS
  302. PASSVARS    += 'XAFLAGS=$(XAFLAGS)'
  303. #endif
  304. #ifdef        INCLUDEDIR
  305. PASSVARS    += 'INCLUDEDIR=$(INCLUDEDIR)'
  306. #endif
  307. #ifdef        INSTALLDIR
  308. PASSVARS    += 'INSTALLDIR=$(INSTALLDIR)'
  309. #endif
  310. #ifdef        TM
  311. PASSVARS    += 'TM=$(TM)'
  312. #endif
  313.  
  314. #
  315. # Collect flags and other machine-dependent things for compilation.
  316. #
  317. #include    <tm.mk>
  318. CTFLAGS        ?= -wt
  319. INSTALLFLAGS    ?=
  320. INSTALLMANFLAGS    ?=
  321. LINTFLAGS    ?= -S -m$(TM)
  322. XCFLAGS        ?=
  323. LOADFLAGS    ?=
  324. XAFLAGS        ?=
  325. CFLAGS        += -g -O $(TMCFLAGS) $(XCFLAGS)
  326.  
  327. # MAKESUBDIRS usage:
  328. #    <target> : MAKESUBDIRS
  329. #
  330. # This .USE target will simply pass <target> onto each subdirectory
  331. # in a separate make.  If the TM variable is defined, then only pass
  332. # the target on to subdirectories whose Makefiles include the given
  333. # TM among their MACHINES.
  334. #
  335. MAKESUBDIRS    : .USE .MAKE .SILENT .NOEXPORT
  336.     for i in $(SUBDIRS);
  337.     do
  338. #ifdef TM
  339.         if grep '^MACHINES' $i/Makefile | grep -s $(TM); then
  340.             true;
  341.         else continue;
  342.         fi
  343. #endif TM
  344.         echo %%% ${i} %%%
  345.         (cd $i; $(MAKE) $(PASSVARS) $(.TARGET))
  346.     done
  347.  
  348. #
  349. # MAKEINSTALL usage:
  350. #    target : source MAKEINSTALL
  351. #
  352. # The source is installed at the target and backed-up to
  353. # $(INSTALLDIR).$(TM).old
  354. #
  355. #ifndef NOBACKUP
  356. BACKUP        = -b $(INSTALLDIR).$(TM).old
  357. #ifdef BACKUPAGE
  358. BACKUP += -B $(BACKUPAGE)
  359. #endif
  360. #else
  361. BACKUP        =
  362. #endif  NOBACKUP
  363. #if !empty(TM:Mspur)
  364. # use a separate install script that doesn't strip
  365. # note that XLD has already been run
  366. MAKEINSTALL    : .USE .SILENT
  367.     $(UPDATE) -m 775 $(BACKUP) $(INSTALLFLAGS) $(.ALLSRC) $(.TARGET)
  368. #else
  369. MAKEINSTALL    : .USE .SILENT
  370.     $(UPDATE) -m 775 -s $(BACKUP) $(INSTALLFLAGS) $(.ALLSRC) $(.TARGET)
  371. #endif
  372.  
  373. #ifndef no_targets
  374. #
  375. # We should define the main targets.  See the Mkmf man page for details.
  376. #
  377.  
  378. LIBS            ?=
  379.  
  380. default            : $(TM).md/$(NAME)
  381. $(TM).md/$(NAME)    : subdirs $(LIBS) $(OBJS) -lc
  382.     $(RM) -f $(.TARGET)
  383.     $(CC) $(CFLAGS) -o $(.TARGET) $(LOADFLAGS) $(OBJS) $(LIBS)
  384. #if !empty(TM:Mspur)
  385.     $(XLD) $(.TARGET)
  386. #endif
  387.  
  388. #
  389. # make the linked.o files depend on the subdirectories so pmake won't 
  390. # stat linked.o before remaking the subdirectories and think that the top-level
  391. # target is up-to-date.  This generates N^2 dependencies, but there aren't
  392. # typically many subdirectories so this should be okay, and all the
  393. # subdirectories get remade anyway.
  394. #
  395. $(SUBDIRS:S|$|/$(TM).md/linked.o|g): $(SUBDIRS)
  396.  
  397. clean            :: .MAKE .SILENT tidy
  398.     echo "rm -f $(TM).md/$(NAME)"
  399.     rm -f $(TM).md/$(NAME)
  400.     echo "rm -f $(TM).md/$(NAME)$(PROFSUFFIX)"
  401.     rm -f $(TM).md/$(NAME)$(PROFSUFFIX)
  402.  
  403. tidy            :: .MAKE .SILENT .NOEXPORT
  404.     for i in $(SUBDIRS);
  405.     do
  406. #ifdef TM
  407.         if grep '^MACHINES' $i/Makefile | grep -s $(TM); then
  408.             true;
  409.         else continue;
  410.         fi
  411. #endif TM
  412.         echo %%% ${i} %%%
  413.         (cd $i; $(MAKE) $(PASSVARS) clean)
  414.     done
  415.  
  416. #
  417. # For "install", a couple of tricks.  First, allow local.mk to disable
  418. # by setting no_install.  Second, use :: instead of : so that local.mk
  419. # can augment install with additional stuff.  Third, don't install if
  420. # TMINSTALLDIR isn't set.
  421. #
  422. INSTCMD            = $(INSTALLDIR).$(TM)/$(NAME)
  423. #ifndef no_install
  424. #ifdef TMINSTALLDIR
  425. install            :: $(INSTCMD) installman
  426. $(INSTCMD)        : $(TM).md/$(NAME) MAKEINSTALL
  427. #else
  428. install            :: .SILENT
  429.     echo "Can't install $(NAME):  no install directory defined"
  430. #endif TMINSTALLDIR
  431. #endif no_install
  432.  
  433. #if empty(MANPAGES)
  434. installman        :: .SILENT
  435.     echo "There's no man page for $(NAME).  Please write one."
  436. #elif !empty(MANPAGES:MNONE)
  437. installman        ::
  438.  
  439. #elif defined(INSTALLMAN)
  440. installman        :: .SILENT
  441.     $(UPDATE) -m 444 -l $(INSTALLMANFLAGS) $(MANPAGES) $(INSTALLMAN)
  442. #else
  443. installman        :: .SILENT
  444.     echo "Can't install man page(s): no install directory defined"
  445. #endif
  446.  
  447. lint            :: lintlib
  448. lint            :: MAKESUBDIRS
  449. lintlib            : $(TM).md/lintlib.ln
  450. $(TM).md/lintlib.ln    : .MAKE .SILENT
  451.     $(RM) -f $(.TARGET)
  452.     for i in $(SUBDIRS);
  453.     do
  454. #ifdef TM
  455.         if grep '^MACHINES' $i/Makefile | grep -s $(TM); then
  456.             true;
  457.         else continue;
  458.         fi
  459. #endif TM
  460.         echo %%% ${i} %%%
  461.         (cd $i; $(MAKE) $(PASSVARS) lintlib)
  462.         $(CAT) ${i}/$(TM).md/llib-l${i}.ln >> $(.TARGET)
  463.     done
  464.  
  465. mkmf            ::
  466.     mkmf
  467.  
  468. newtm            ! .MAKE .SILENT
  469.     if $(TEST) -d $(TM).md; then
  470.         true
  471.     else
  472.         mkdir $(TM).md;
  473.         chmod 775 $(TM).md;
  474.         mkmf -m$(TM)
  475.     fi
  476.     for i in $(SUBDIRS);
  477.     do
  478.         echo %%% ${i} %%%
  479.         (cd $i; $(MAKE) $(PASSVARS) newtm)
  480.     done
  481.  
  482. profile            : $(TM).md/$(NAME)$(PROFSUFFIX)
  483. $(TM).md/$(NAME)$(PROFSUFFIX)    : subdirs_p $(POBJS) $(LIBS:S/.a$/_p.a/g) 
  484.     $(RM) -f $(.TARGET)
  485.     $(CC) $(CFLAGS) -pg -o $(.TARGET) $(LOADFLAGS) $(POBJS) $(LIBS) 
  486.  
  487.  
  488. #
  489. # The following target does a quick make without cycling through to
  490. # recompile in each of the subdirectories.
  491. #
  492. quick            : $(LIBS) -lc
  493.     $(RM) -f $(TM).md/$(NAME)
  494.     $(CC) $(CFLAGS) -o $(TM).md/$(NAME) $(LOADFLAGS) $(OBJS) $(LIBS)
  495.  
  496. rcsinfo            : .MAKE .SILENT
  497.     for i in $(SUBDIRS);
  498.     do
  499.         echo %%% ${i} %%%
  500.         (cd $i; rcsinfo)
  501.     done
  502.  
  503. #
  504. # The rules immediately below are a trick to get Pmake to remake in
  505. # the subdirectories, but not to consider $(TM).md/$(NAME) to
  506. # be out-of-date with respect to $(OBJS) unless $(OBJS) are actually
  507. # more recent than $(TM).md/$(NAME).
  508. #
  509.  
  510. $(OBJS)            : .DONTCARE
  511. subdirs            : .MAKE .EXEC .SILENT .NOEXPORT
  512.     for i in $(SUBDIRS);
  513.     do
  514. #ifdef TM
  515.         if grep '^MACHINES' $i/Makefile | grep -s $(TM); then
  516.             true;
  517.         else continue;
  518.         fi
  519. #endif TM
  520.         echo %%% ${i} %%%
  521.         (cd $i; $(MAKE) $(PASSVARS))
  522.     done
  523.  
  524. $(POBJS)            : .DONTCARE
  525. subdirs_p            : .MAKE .EXEC .SILENT .NOEXPORT
  526.     for i in $(SUBDIRS);
  527.     do
  528. #ifdef TM
  529.         if grep '^MACHINES' $i/Makefile | grep -s $(TM); then
  530.             true;
  531.         else continue;
  532.         fi
  533. #endif TM
  534.         echo %%% ${i} %%%
  535.         (cd $i; $(MAKE) $(PASSVARS) profile)
  536.     done
  537.  
  538. depend mkmf tags     :: MAKESUBDIRS
  539.  
  540. dist        !
  541. #if defined(DISTDIR) && !empty(DISTDIR)
  542.     for i in Makefile local.mk $(MANPAGES)
  543.     do
  544.     if $(TEST) -e $${i}; then
  545.         $(UPDATE)  $${i} $(DISTDIR)/$${i} ;else true; fi
  546.     done
  547.     for i in $(SUBDIRS)
  548.     do
  549.         echo %%% $${i} %%%
  550. #ifdef TM
  551.         ( cd $${i}; $(MAKE) dist 'DISTDIR=$(DISTDIR)'/$${i} 'TM=$(TM)' )
  552. #else
  553.         ( cd $${i}; $(MAKE) dist 'DISTDIR=$(DISTDIR)'/$${i} )
  554. #endif
  555.     done
  556. #else
  557.     @@echo "Sorry, no distribution directory defined for $(NAME)."
  558. #endif
  559.  
  560. #include <all.mk>
  561.  
  562. #endif no_targets
  563.  
  564. .MAKEFLAGS    : -C        # No compatibility needed
  565. @
  566.  
  567.  
  568. 1.37
  569. log
  570. @Added /X11/R4 directories.
  571. @
  572. text
  573. @d20 1
  574. a20 1
  575. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.36 90/03/07 15:00:57 douglis Exp $
  576. d240 2
  577. a241 2
  578. lintlib            : $(TM).md/lintlib
  579. $(TM).md/lintlib    : .MAKE .SILENT
  580. d253 1
  581. a253 1
  582.         $(CAT) ${i}/$(TM).md/lintlib >> $(.TARGET)
  583. @
  584.  
  585.  
  586. 1.36
  587. log
  588. @removed entry to clear PATH.a -- why on earth would we want to remove
  589. the path that points to /sprite/lib?!
  590. @
  591. text
  592. @d20 1
  593. a20 1
  594. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.35 90/02/27 17:43:05 douglis Exp Locker: douglis $
  595. d59 3
  596. @
  597.  
  598.  
  599. 1.35
  600. log
  601. @added support for backup age flag BACKUPAGE
  602. @
  603. text
  604. @d20 1
  605. a20 1
  606. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.34 90/02/20 11:50:16 douglis Exp Locker: douglis $
  607. a24 5
  608.  
  609. #
  610. # Set up search paths.
  611. #
  612. .PATH.a        : # Clear out
  613. @
  614.  
  615.  
  616. 1.34
  617. log
  618. @tried to add some consistency to ::/: operators, and fixed tve's TYPE==personal complaint
  619. @
  620. text
  621. @d20 1
  622. a20 1
  623. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.33 90/01/30 19:43:04 tve Exp Locker: douglis $
  624. d150 3
  625. @
  626.  
  627.  
  628. 1.33
  629. log
  630. @more LOADFLAGS handling
  631. @
  632. text
  633. @d20 1
  634. a20 1
  635. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.31 89/12/13 21:30:39 tve Exp $
  636. d70 9
  637. @
  638.  
  639.  
  640. 1.32
  641. log
  642. @added LOADFLAGS handling
  643. @
  644. text
  645. @d266 1
  646. a266 1
  647.     $(CC) $(CFLAGS) -pg -o $(.TARGET) $(POBJS) $(LIBS) 
  648. d275 1
  649. a275 1
  650.     $(CC) $(CFLAGS) -o $(TM).md/$(NAME) $(OBJS) $(LIBS)
  651. @
  652.  
  653.  
  654. 1.31
  655. log
  656. @installman used ':' instead of '::'
  657. @
  658. text
  659. @d20 1
  660. a20 1
  661. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.30 89/11/30 13:56:44 rab Exp Locker: tve $
  662. d107 1
  663. d164 1
  664. a164 1
  665.     $(CC) $(CFLAGS) -o $(.TARGET) $(OBJS) $(LIBS)
  666. @
  667.  
  668.  
  669. 1.30
  670. log
  671. @Changed dist: to dist!,
  672. @
  673. text
  674. @d20 1
  675. a20 1
  676. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.29 89/11/30 11:11:12 douglis Exp Locker: rab $
  677. d214 1
  678. a214 1
  679. installman        : .SILENT
  680. d220 1
  681. a220 1
  682. installman        : .SILENT
  683. d223 1
  684. a223 1
  685. installman        : .SILENT
  686. @
  687.  
  688.  
  689. 1.29
  690. log
  691. @make the linked.o files depend on the subdirectories so pmake won't
  692. tat linked.o before remaking the subdirectories and think that the top-level
  693.  target is up-to-date..
  694. @
  695. text
  696. @d20 1
  697. a20 1
  698. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.28 89/10/09 16:59:21 tve Exp Locker: douglis $
  699. d320 1
  700. a320 1
  701. dist:
  702. @
  703.  
  704.  
  705. 1.28
  706. log
  707. @Added INSTALLMAN, INSTALLDIR for TYPE=X11R3
  708. @
  709. text
  710. @d20 1
  711. a20 1
  712. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.27 89/10/09 06:55:55 rab Exp Locker: tve $
  713. d168 8
  714. @
  715.  
  716.  
  717. 1.27
  718. log
  719. @Fixed distribution stuff.
  720. @
  721. text
  722. @d20 1
  723. a20 1
  724. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.26 89/10/02 10:05:56 rab Exp Locker: rab $
  725. d61 3
  726. @
  727.  
  728.  
  729. 1.26
  730. log
  731. @Added Distribution stuff.
  732. @
  733. text
  734. @d20 1
  735. a20 1
  736. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.25 89/07/21 18:29:53 douglis Exp Locker: rab $
  737. d46 1
  738. d238 1
  739. a238 1
  740.     if test -d $(TM).md; then
  741. d313 2
  742. a314 1
  743.     if test -e $${i}; then $(UPDATE)  $${i} $(DISTDIR)/$${i} ;fi
  744. @
  745.  
  746.  
  747. 1.25
  748. log
  749. @changed newtm to do mkmf for only the new machine type
  750. @
  751. text
  752. @d20 1
  753. a20 1
  754. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.24 89/07/20 17:36:25 mgbaker Exp Locker: douglis $
  755. d307 19
  756. @
  757.  
  758.  
  759. 1.24
  760. log
  761. @Got rid of extra porting stuff for sun4.
  762. @
  763. text
  764. @d20 1
  765. a20 1
  766. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.23 89/07/02 23:31:02 rab Exp Locker: mgbaker $
  767. d242 1
  768. a242 1
  769.         mkmf
  770. @
  771.  
  772.  
  773. 1.23
  774. log
  775. @Fixed sun4 stuff to work with gcc & gld.
  776. @
  777. text
  778. @d20 1
  779. a20 1
  780. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.22 89/07/02 23:06:19 douglis Exp Locker: rab $
  781. a103 4
  782. #if !empty(TM:Msun4)
  783. CFLAGS        += -g $(TMCFLAGS) $(XCFLAGS)
  784. LOADFLAGS    = -L/sprite/lib/sun4.md
  785. #else
  786. a104 1
  787. #endif
  788. a158 4
  789. #if !empty(TM:Msun4)
  790.     $(LD) -msun4 -o /tmp/$(.TARGET) $(LOADFLAGS) -e start $(OBJS) $(LIBS) /sprite/lib/sun4.md/libc.a
  791. #    $(LD) $(CFLAGS) -o $(.TARGET) $(OBJS) $(LIBS)
  792. #else
  793. a159 1
  794. #endif
  795. @
  796.  
  797.  
  798. 1.22
  799. log
  800. @*** empty log message ***
  801. @
  802. text
  803. @d20 1
  804. a20 1
  805. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.21 89/06/29 17:30:11 douglis Exp Locker: douglis $
  806. d165 2
  807. a166 2
  808.     $(LD) -o /tmp/$(.TARGET) $(LOADFLAGS) -Bstatic -e start -T 2020 -Tdata 40000 $(OBJS) $(LIBS) /sprite/src/lib/c/sun4.md/libc.a
  809.     $(LD) $(CFLAGS) -o $(.TARGET) $(OBJS) $(LIBS)
  810. @
  811.  
  812.  
  813. 1.21
  814. log
  815. @added some sun4-dependent checks (done by MGB).
  816. @
  817. text
  818. @d20 1
  819. a20 1
  820. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.20 89/04/23 23:20:20 jhh Exp Locker: mgbaker $
  821. d181 1
  822. a181 1
  823. tidy            :: .MAKE .SILENT
  824. @
  825.  
  826.  
  827. 1.20
  828. log
  829. @added spur support
  830. @
  831. text
  832. @d20 1
  833. a20 1
  834. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.19 89/04/03 22:23:41 douglis Exp $
  835. d104 4
  836. d109 1
  837. d164 4
  838. d169 1
  839. @
  840.  
  841.  
  842. 1.19
  843. log
  844. @added 'tidy' target.
  845. @
  846. text
  847. @d20 1
  848. a20 1
  849. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.18 89/03/15 22:25:09 douglis Exp Locker: douglis $
  850. d139 3
  851. d143 3
  852. d147 1
  853. d160 4
  854. @
  855.  
  856.  
  857. 1.18
  858. log
  859. @added check for MANPAGES = NONE to override complaint about lack of man
  860. pages.
  861. @
  862. text
  863. @d20 1
  864. a20 1
  865. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.17 89/03/15 22:14:13 jhh Exp Locker: douglis $
  866. d154 1
  867. a154 1
  868. clean            :: .MAKE .SILENT
  869. d159 2
  870. @
  871.  
  872.  
  873. 1.17
  874. log
  875. @added 'profile' target
  876. @
  877. text
  878. @d20 1
  879. a20 1
  880. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.16 88/12/31 11:11:58 ouster Exp Locker: jhh $
  881. d191 3
  882. @
  883.  
  884.  
  885. 1.16
  886. log
  887. @Type in previous "fix".
  888. @
  889. text
  890. @d20 1
  891. a20 1
  892. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.15 88/12/29 08:37:54 ouster Exp $
  893. d24 1
  894. d32 5
  895. d157 2
  896. d234 6
  897. d274 14
  898. @
  899.  
  900.  
  901. 1.15
  902. log
  903. @When installing man pages, copy files referenced by symbolic links,
  904. not the links themselves.
  905. @
  906. text
  907. @d20 1
  908. a20 1
  909. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.14 88/12/28 17:06:25 ouster Exp Locker: ouster $
  910. d59 1
  911. a59 1
  912. INSTALLMAN    ?= /srpite/man/admin
  913. @
  914.  
  915.  
  916. 1.14
  917. log
  918. @Add "installman" target, use TYPE to pick installation locations.
  919. @
  920. text
  921. @d20 1
  922. a20 1
  923. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.13 88/11/23 17:28:22 ouster Exp $
  924. d185 1
  925. a185 1
  926.     $(UPDATE) -m 444 $(INSTALLMANFLAGS) $(MANPAGES) $(INSTALLMAN)
  927. @
  928.  
  929.  
  930. 1.13
  931. log
  932. @Revisions to make "make newtm" work.
  933. @
  934. text
  935. @a6 2
  936. #    INSTALLDIR    generic place to install archive (we'll add a .md
  937. #            subdirectory specifier here)
  938. d14 2
  939. d20 1
  940. a20 1
  941. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.12 88/11/23 09:52:14 ouster Exp Locker: ouster $
  942. d43 23
  943. d94 1
  944. d166 2
  945. a167 1
  946. # can augment install with additional stuff.
  947. d171 2
  948. a172 1
  949. install            :: $(INSTCMD)
  950. d174 4
  951. d179 11
  952. @
  953.  
  954.  
  955. 1.12
  956. log
  957. @Major changes to finalize the new C library (move include.new to
  958. include, etc.).
  959. @
  960. text
  961. @d20 1
  962. a20 1
  963. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.11 88/11/10 17:52:58 douglis Exp Locker: ouster $
  964. d171 13
  965. a183 3
  966. newtm            :: .IGNORE
  967.     mkdir $(TM).md
  968.     mkmf
  969. d221 1
  970. a221 1
  971. depend mkmf newtm tags     :: MAKESUBDIRS
  972. @
  973.  
  974.  
  975. 1.11
  976. log
  977. @added .NOEXPORT in subdirs target, to go along with the
  978. change I already made to MAKESUBDIRS macro.
  979. @
  980. text
  981. @d20 1
  982. a20 1
  983. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.10 88/11/08 11:17:49 douglis Exp Locker: douglis $
  984. d68 4
  985. a71 1
  986. #include    <tmflags.mk>
  987. d73 2
  988. a74 3
  989. CFLAGS        += $(TMCFLAGS) -I. $(.INCLUDES) $(XCFLAGS)
  990. LINTFLAGS    ?= -S
  991. INSTALLFLAGS    ?=
  992. d80 4
  993. a83 1
  994. # in a separate make.
  995. d87 6
  996. a97 10
  997. # MAKECMDNOVERS usage:
  998. #    <program> : <objects> <libraries> MAKECMDNOVERS
  999. #
  1000. # Links a command, without using the version.[ho] files.
  1001. #
  1002. MAKECMDNOVERS    :  .USE -lc
  1003.     $(RM) -f $(.TARGET)
  1004.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC)
  1005.  
  1006. #
  1007. d119 1
  1008. d124 3
  1009. a126 9
  1010. #
  1011. # The rules immediately below are a trick to get Pmake to remake in
  1012. # the subdirectories, but not to consider $(TM).md/$(NAME) to
  1013. # be out-of-date with respect to $(OBJS) unless $(OBJS) are actually
  1014. # more recent than $(TM).md/$(NAME).
  1015. #
  1016.  
  1017. $(OBJS)            : .DONTCARE
  1018. subdirs            : .MAKE .EXEC .SILENT .NOEXPORT
  1019. d129 6
  1020. d136 1
  1021. a136 1
  1022.         (cd $i; $(MAKE) $(PASSVARS))
  1023. a137 1
  1024. default            : $(TM).md/$(NAME)
  1025. a139 8
  1026. # The following target does a quick make without cycling through to
  1027. # recompile in each of the subdirectories.
  1028. #
  1029. quick            : $(LIBS) -lc
  1030.     $(RM) -f $(TM).md/$(NAME)
  1031.     $(CC) $(CFLAGS) -o $(TM).md/$(NAME) $(OBJS) $(LIBS)
  1032.  
  1033. #
  1034. d150 3
  1035. d157 6
  1036. a166 1
  1037. lintlib            : $(TM).md/lintlib
  1038. d168 2
  1039. a169 2
  1040. lint            :: lintlib
  1041. lint            :: MAKESUBDIRS
  1042. d171 3
  1043. a173 6
  1044. mkmf            : .MAKE .SILENT
  1045.     for i in $(SUBDIRS);
  1046.     do
  1047.         echo %%% ${i} %%%
  1048.         (cd $i; mkmf)
  1049.     done
  1050. d175 9
  1051. a183 1
  1052. newtarget        : .MAKE .SILENT
  1053. d187 1
  1054. a187 1
  1055.         (cd $i; mkdir $(TM).md)
  1056. d190 9
  1057. a198 1
  1058. rcsinfo            : .MAKE .SILENT
  1059. d201 6
  1060. d208 1
  1061. a208 1
  1062.         (cd $i; rcsinfo)
  1063. d211 1
  1064. a211 1
  1065. clean depend tags     :: MAKESUBDIRS
  1066. @
  1067.  
  1068.  
  1069. 1.10
  1070. log
  1071. @don't export the "for i in $(SUBDIRS) loop.
  1072. @
  1073. text
  1074. @d20 1
  1075. a20 1
  1076. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.9 88/10/19 16:48:30 ouster Exp Locker: douglis $
  1077. d130 1
  1078. a130 1
  1079. subdirs            : .MAKE .EXEC .SILENT
  1080. @
  1081.  
  1082.  
  1083. 1.9
  1084. log
  1085. @I think I finally got things right so that re-makes will always
  1086. occur in the subdirectories, but the top-level program won't be
  1087. linked unless one of the subdirectories actually changed.
  1088. @
  1089. text
  1090. @d20 1
  1091. a20 1
  1092. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.8 88/10/19 09:40:12 ouster Exp Locker: ouster $
  1093. d79 1
  1094. a79 1
  1095. MAKESUBDIRS    : .USE .MAKE .SILENT
  1096. @
  1097.  
  1098.  
  1099. 1.8
  1100. log
  1101. @Remove .EXEC:  causes final program not to be remade right.
  1102. @
  1103. text
  1104. @d20 1
  1105. a20 1
  1106. # $Header: /sprite/lib/pmake/RCS/bigcmdtop.mk,v 1.7 88/10/14 16:54:31 ouster Exp Locker: ouster $
  1107. d118 1
  1108. a118 1
  1109. $(TM).md/$(NAME)    : $(LIBS) $(OBJS) -lc
  1110. d121 15
  1111. a135 2
  1112. $(OBJS)            :: .MAKE
  1113.     cd $(.TARGET:H:H); $(MAKE) $(PASSVARS)
  1114. @
  1115.  
  1116.  
  1117. 1.7
  1118. log
  1119. @Revisions for new version of Pmake.
  1120. @
  1121. text
  1122. @d20 1
  1123. a20 1
  1124. # $Header: bigcmdtop.mk,v 1.6 88/10/03 09:51:58 ouster Exp $
  1125. d121 1
  1126. a121 1
  1127. $(OBJS)            :: .MAKE .EXEC
  1128. @
  1129.  
  1130.  
  1131. 1.6
  1132. log
  1133. @Use .EXEC attribute instead of old .ZEROTIME.
  1134. @
  1135. text
  1136. @d20 1
  1137. a20 1
  1138. # $Header: bigcmdtop.mk,v 1.5 88/10/02 17:14:55 ouster Exp $
  1139. d118 1
  1140. a118 1
  1141. $(TM).md/$(NAME)    : $(LIBS) $(SUBDIRS) $(OBJS) -lc
  1142. d121 2
  1143. a122 2
  1144. $(SUBDIRS)        :: .EXEC
  1145.     cd $(.TARGET); $(MAKE) $(PASSVARS)
  1146. @
  1147.  
  1148.  
  1149. 1.5
  1150. log
  1151. @Don't use .ZEROTIME attribute anymore.
  1152. @
  1153. text
  1154. @d20 1
  1155. a20 1
  1156. # $Header: bigcmdtop.mk,v 1.4 88/10/02 11:30:33 ouster Exp $
  1157. d121 1
  1158. a121 1
  1159. $(SUBDIRS)        :: .MAKE
  1160. @
  1161.  
  1162.  
  1163. 1.4
  1164. log
  1165. @Moved linked modules from ../$(TM).md/$(MODULE).o to $(TM).md/linked.o.
  1166. This makes it easier to share modules between programs by making
  1167. symbolic links.
  1168. @
  1169. text
  1170. @d20 1
  1171. a20 1
  1172. # $Header: bigcmdtop.mk,v 1.3 88/09/19 09:02:38 ouster Exp $
  1173. d121 1
  1174. a121 1
  1175. $(SUBDIRS)        :: .ZEROTIME
  1176. d144 1
  1177. a144 1
  1178. $(TM).md/lintlib    : .MAKE .SILENT .ZEROTIME
  1179. @
  1180.  
  1181.  
  1182. 1.3
  1183. log
  1184. @Added explicit dependency for installed file name.
  1185. @
  1186. text
  1187. @d20 1
  1188. a20 1
  1189. # $Header: bigcmdtop.mk,v 1.2 88/09/11 17:02:28 ouster Exp $
  1190. d23 1
  1191. a23 1
  1192. OBJS        = $(SUBDIRS:S/$/.o/g:S|^|$(TM).md/|g)
  1193. @
  1194.  
  1195.  
  1196. 1.2
  1197. log
  1198. @Various fixes to get X server to compile.
  1199. @
  1200. text
  1201. @d20 1
  1202. a20 1
  1203. # $Header: biglibtop.mk,v 1.5 88/08/31 17:15:24 ouster Exp $
  1204. d98 1
  1205. a98 1
  1206. #    install : <files to install> MAKEINSTALL
  1207. d100 1
  1208. a100 1
  1209. # The sources are installed in $(INSTALLDIR).$(TM) and backed-up to
  1210. d109 1
  1211. a109 2
  1212.     $(UPDATE) -m 775 -s $(BACKUP) $(INSTALLFLAGS) $(.ALLSRC) \
  1213.         $(INSTALLDIR).$(TM)/$(NAME)
  1214. d138 1
  1215. d140 2
  1216. a141 1
  1217. install            :: $(TM).md/$(NAME) MAKEINSTALL
  1218. @
  1219.  
  1220.  
  1221. 1.1
  1222. log
  1223. @Initial revision
  1224. @
  1225. text
  1226. @d23 1
  1227. a23 1
  1228. OBJS        = $(SUBDIRS:S/$/.o/g)
  1229. a28 2
  1230. .PATH.o        : # Clear out
  1231. .PATH.o        : $(TM).md
  1232. d119 1
  1233. a119 1
  1234. $(TM).md/$(NAME)    : $(LIBS) $(SUBDIRS) -lc
  1235. d122 1
  1236. a122 1
  1237. $(SUBDIRS)        :: .SILENT
  1238. d127 8
  1239. a141 8
  1240.  
  1241. #
  1242. # The following target does a quick make without cycling through to
  1243. # recompile in each of the subdirectories.
  1244. #
  1245. quick            : $(LIBS) -lc
  1246.     $(RM) -f $(.TARGET)
  1247.     $(CC) $(CFLAGS) -o $(.TARGET) $(OBJS) $(LIBS)
  1248. @
  1249.